<template>
    <div class="container">
    <van-nav-bar title="vant键盘密码" left-arrow  fixed :border="false"
      @click-left='$router.push("/")'/>
      <van-button type="primary" @click="showKeyboard = true"> 打开键盘</van-button>
      <van-cell><van-tag>{{passowrd}}</van-tag></van-cell>
      <transition name="fade">
          <KeyBoard v-if="showKeyboard" @end="Pay"/>
      </transition>
    </div>
</template>

<script>
export default {
    data(){
        return{
            showKeyboard:false,
            passowrd:''
        }
    },
    methods:{
        Pay(e){
            console.log("e",e);
            this.passowrd = e;
            this.showKeyboard = false;
        }
    }
}
</script>

<style lang="less" scoped>

</style>